The new methods will make it easier to add alternative sources
for the banner text.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
this._authPrompt.cancelButton.visible = cancelVisible;
}
+ _getBannerText() {
+ const enabled = this._settings.get_boolean(GdmUtil.BANNER_MESSAGE_KEY);
+ if (!enabled)
+ return null;
+
+ return this._settings.get_string(GdmUtil.BANNER_MESSAGE_TEXT_KEY);
+ }
+
_updateBanner() {
- let enabled = this._settings.get_boolean(GdmUtil.BANNER_MESSAGE_KEY);
- let text = this._settings.get_string(GdmUtil.BANNER_MESSAGE_TEXT_KEY);
+ const text = this._getBannerText();
- if (enabled && text) {
+ if (text) {
this._bannerLabel.set_text(text);
this._bannerLabel.show();
} else {